<template>
	<view class="load-main">
		<NavbarFeedback></NavbarFeedback>
		<view class="load-box">
			<view class="load-tips">
				问题和意见
			</view>
			<textarea class="load-question" maxlength="200" placeholder-style="color:#d9d9d9"
				v-model="question" placeholder="请填写10个字以上的问题描述以便我们提供更好的帮助"></textarea>
			<!-- <view class="load-tips">
				图片(选填，提供问题截图)
			</view>
			<view></view> -->
			<view class="load-tips">
				联系电话
			</view>
			<input class="load-phone" type="text" maxlength="11" placeholder-style="color:#d9d9d9" 
				v-model="phone" placeholder="选填, 便于我们与你联系"/>
		</view>
		<button class="load-button" type="primary" @tap="feedback()">提交</button>
	</view>
</template>

<script>
	import NavbarFeedback from "../../uni_modules/navbar/navbar_feedback.vue"
	
	import httpTypes from '@/js/http-types.js'
	
	export default {
		data() {
			return {
				question:'',
				phone:''
			}
		},
		onLoad() {
	
		},
		methods:{
			feedback(){
				httpTypes.request({
					url: '',
					data:{
						question: this.question,
						phone: this.phone
					},
					success:(res) => {
						uni.navigateBack({
							delta: 1
						})
					}
				});
			}
		},
		components: {
			NavbarFeedback,
		}
	}
</script>

<style lang="scss">
	.load-tips{
		height: 25px;
		line-height: 25px;
		font-size: 10px;
		color: #818181;
		padding-top: 5px;
	}
	
	.load-question{
		background-color: white;
		width: 100%;
		padding: 10px;
	}
	
	.load-phone{
		background-color: white;
		width: 100%;
		height: 20px;
		padding: 10px;
	}
	
	.load-button{
		margin-top: 50px;
		width: 160px;
		height: 40px;
		line-height: 40px;
	}
</style>
